import { http } from "@/uni-sub-base/service/request.js"

let serviceName = "Order/"
import { getBaseUrls } from "@/utils/appUrl.js"
//提交订单
export function SubmitFromCar(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "SubmitFromCar",
        data,
    })
}
export function GetOrderInfoByNumber(path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetOrderInfoByNumber" + path,
    })
}
//获取订单列表
export function GetOrderPage(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetOrderPage",
        data,
    })
}
//获取订单详情
export function GetOrderDetail(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetOrderDetail" + path,
        data,
    })
}
//提交订单获取相关优惠政策
export function GetProductDataBySubmit(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetProductDataBySubmit" + path,
        data,
    })
}

//提交订单获取相关优惠政策
export function StatisPostageMoneyByCar(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "StatisPostageMoneyByCar" + path,
        data,
    })
}

//代客下单货到付款
export function ValetCashDelivery(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "ValetCashDelivery" + path,
        data,
    })
}

//确认收款
export function OrderReceipt(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "OrderReceipt" + path,
        data,
    })
}

//取消订单
export function OrderCancel(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "OrderCancel" + path,
        data,
    })
}

//删除订单
export function OrderDelete(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "OrderDelete" + path,
        data,
    })
}

//获取订单状态选项
export function GetOrderStateSelects() {
    return http.get({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetOrderStateSelects",
    })
}

//获取订单日志列表
export function GetOrderLogList(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetOrderLogList" + path,
        data,
    })
}

//获取订单发货信息 （旧:简单信息）
export function GetOrderSendList(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetOrderSendList" + path,
        data,
    })
}

//优惠金额
export function DiscountMoney(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "DiscountMoney" + path,
        data,
    })
}

//确认收货
export function TakeOrder(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "TakeOrder",
        data,
    })
}

//获取业务员代收货设置
export function GetEmployeeTake(data = {}) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetEmployeeTake",
        data,
    })
}
//分享支付订单
export function SharePayOrder(orderId, payway) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "SharePayOrder?orderId=" + orderId + "&payway=" + payway,
    })
}
//获取订单发货记录 : 含物流信息
export function GetDeliveryRecord(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetDeliveryRecord" + path,
        data,
    })
}
//获取可选择的配送方式(运费模板)
export function GetPostageTypeList() {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetPostageTypeList",
    })
}
//获取支付信息
export function GetPayOrderId(path) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetPayOrderId" + path,
    })
}
//订单线下支付
export function XianPay(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "XianPay",
        data,
    })
}
//获取订单基础参数
export function GetInitOrderInfo() {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetInitOrderInfo",
    })
}
//销售分析报表
export function GetSaleHeadInfo(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetSaleHeadInfo",
		data,
    })
}
//客户增长趋势
export function GetOrderAddTrend(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetOrderAddTrend",
		data,
    })
}
//商品销售统计
export function GetOrderByProductAnalysisInfo(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetOrderByProductAnalysisInfo",
		data,
    })
}
//订单分析
export function GetOrderAnalysisInfo(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetOrderAnalysisInfo",
		data,
    })
}
//客单分析
export function GetOrderUserPriceInfo(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetOrderUserPriceInfo",
		data,
    })
}
//运营数据
export function GetAddUserGroupByDay(data) {
    return http.post({
        url: getBaseUrls().baseUrlGuide + serviceName + "GetAddUserGroupByDay",
		data,
    })
}

